import request from "@/utils/request";

export const getMenuList = <T>(data?: any) => request<T>('/admin/menus', {
    method: 'post',
    data
})

export const addMenu = async <T>(data?: any) => request<T>('/admin/addMenu', {
    method: 'post',
    data
})

export const deleteMenu = async <T>(data?: any) => request<T>('/admin/delete', {
    method: 'post',
    data
})

export const updateMenu = async <T>(data?: any) => request<T>('/admin/update', {
    method: 'post',
    data
})

export const _moveUp = async <T>(data?: any) => request<T>('/admin/sort', {
    method: 'post',
    data
})

export const _getRoles = async (data?:any) => request('/admin/roles', {
    method: 'post',
    data
})